package com.yuexin.project.account.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yuexin.common.support.Convert;
import com.yuexin.project.account.domain.AccountList;
import com.yuexin.project.account.mapper.ListMapper;

/**
 * 厨房流水账 服务层实现
 * 
 * @author yuexin
 * @date 2018-10-24
 */
@Service
public class AccountListServiceImpl implements AccountListService 
{
	@Autowired
	private ListMapper listMapper;

	/**
     * 查询厨房流水账信息
     * 
     * @param accountId 厨房流水账ID
     * @return 厨房流水账信息
     */
    @Override
	public AccountList selectListById(Integer accountId)
	{
	    return listMapper.selectListById(accountId);
	}
	
	/**
     * 查询厨房流水账列表
     * 
     * @param list 厨房流水账信息
     * @return 厨房流水账集合
     */
	@Override
	public List<AccountList> selectListList(AccountList list)
	{
	    return listMapper.selectListList(list);
	}
	
    /**
     * 新增厨房流水账
     * 
     * @param list 厨房流水账信息
     * @return 结果
     */
	@Override
	public int insertList(AccountList list)
	{
		System.out.println("insert");
	    return listMapper.insertList(list);
	}
	
	/**
     * 修改厨房流水账
     * 
     * @param list 厨房流水账信息
     * @return 结果
     */
	@Override
	public int updateList(AccountList list)
	{
	    return listMapper.updateList(list);
	}

	/**
     * 删除厨房流水账对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteListByIds(String ids)
	{
		System.out.println("------------------"+ids+"-----------------------------------------");
		return listMapper.deleteListByIds(Convert.toStrArray(ids));
	}
	
}
